package com.lipaluma.xml.validator;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import com.lipaluma.field.validator.ValidatorFactory;

@XmlRootElement(name=XmlStartsWithValidator.STARTS_WITH)
@XmlAccessorType(XmlAccessType.FIELD)
public class XmlStartsWithValidator implements XmlValidator {
	public static final String STARTS_WITH = "starts-with";
	@XmlAttribute(required=true)
	private String value;
	
	@Override
	public String getFunctionValidation() {
		return ValidatorFactory.VALIDATION_STARTS_WITH_FUNCTION;
	}
	
	public String getValue() {
		return value;
	}
}
